package com.tourism.home.service;

import com.tourism.home.dao.LikesDao;
import com.tourism.home.entity.*;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LikesService {
    @Autowired
    LikesDao likesDao;

    public Integer getLikesByPID(Integer pid){
        return likesDao.getLikesByPID(pid);
    }

    public List<Integer> getLikesPostUids(Integer pid){return likesDao.getLikesPostUids(pid);}

    public Integer addLikes(Integer pid,Integer uid){return likesDao.addLikes(pid,uid); }
    public Integer deleteLikes(Integer pid,Integer uid){return likesDao.deleteLikes(pid,uid); }
    public Integer deleteLikesByPID(Integer pid){return likesDao.deleteLikesByPID(pid); }
    public List<Message> getMessageByUID(Integer uid){return likesDao.getMessageByUID(uid);}
    public Integer updateLikesStatus(Integer uid){return likesDao.updateLikesStatus(uid);}


}
